package com.vstartek.dm.mongo.dao;

import java.util.List;

import org.springframework.data.mongodb.core.query.Query;

import com.vstartek.dm.util.PageParam;

public interface Dao<T> {

	T findById(Object id);

	T findById(Object id, String tableName);

	List<T> findByList(T t, int first, int max);

	List<T> findByList(T t, int first, int max, String tableName);

	Long totalnum(T t);

	Long totalnum(T t, String tableName);

	boolean save(T t);

	boolean save(T t, String tableName);

	boolean update(T t);

	boolean update(T t, String tableName);

	List<T> findByList(Query query);
	
	List<T> findByList(Query query,PageParam pageParam);

	Long totalnum(Query query);
	
	List<T> findByList(Query query,PageParam pageParam, String tableName);
	
	Long totalnum(Query query, String tableName);
	
	

}
